* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media screen and (orientation: portrait) {
    .game-container {
        display: none;
    }
    
    body::before {
        content: "请将设备横屏使用";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 24px;
        white-space: nowrap;
        color: #ecf0f1;
    }
}

@media screen and (orientation: portrait) {
    .game-container {
        display: none;
    }
    
    body::before {
        content: "请将设备横屏使用";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 24px;
        white-space: nowrap;
        color: #ecf0f1;
    }
}

body {
    font-family: Arial, sans-serif;
    background-color: #2c3e50;
    color: #ecf0f1;
}

.game-container {
    max-width: 100vw;
    margin: 10px auto;
    padding: 10px;
    background-color: #34495e;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
}

.game-header {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #2c3e50;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.game-header h1 {
    font-size: clamp(18px, 4vw, 24px);
    margin: 0;
    color: #ecf0f1;
    white-space: nowrap;
}

.game-stats {
    display: flex;
    gap: clamp(10px, 2vw, 20px);
    font-size: clamp(14px, 3vw, 16px);
    white-space: nowrap;
}

button, select {
    padding: clamp(6px, 2vw, 8px) clamp(12px, 3vw, 16px);
    font-size: clamp(12px, 3vw, 14px);
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, select:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.game-board {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px 20px;
    background-color: #2c3e50;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card-columns {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: clamp(4px, 1vw, 8px);
    margin-bottom: clamp(10px, 2vw, 15px);
    position: relative;
    min-height: calc(12.5vw + 400px);
}

.empty-column-placeholder {
    width: calc(9vw - 4px);
    height: calc(12.5vw - 4px);
    min-width: 45px;
    min-height: 65px;
    max-width: 60px;
    max-height: 85px;
    border: 2px dashed #3498db;
    border-radius: 6px;
    position: absolute;
    opacity: 0.5;
    background-color: rgba(52, 152, 219, 0.1);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
    pointer-events: auto;
}

.card {
    width: calc(9vw - 4px);
    height: calc(12.5vw - 4px);
    min-width: 45px;
    min-height: 65px;
    max-width: 60px;
    max-height: 85px;
    background-color: white;
    border-radius: 6px;
    position: absolute;
    cursor: pointer;
    user-select: none;
    color: #2c3e50;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    z-index: 1;
}

.card:first-child {
    margin-top: 0;
}

.card.back {
    background-color: #95a5a6;
    margin-top: -42px;
    z-index: 0;
}

.card.selected {
    box-shadow: 0 0 10px #f1c40f;
    z-index: 2;
}

.deck-pile {
    width: calc(9vw - 4px);
    height: calc(12.5vw - 4px);
    min-width: 45px;
    min-height: 65px;
    max-width: 60px;
    max-height: 85px;
    background-color: #95a5a6;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.deck-count {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 14px;
    color: #ecf0f1;
}

.deck-pile:hover {
    transform: translateY(-5px);
    transition: transform 0.2s;
}